
using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class PRINT_LOGMap : EntityTypeConfiguration<PRINT_LOG>
    {
        public PRINT_LOGMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.SERIAL_NO)
                .IsRequired()
                .HasMaxLength(100);

            this.Property(t => t.OPERATOR_NO)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.AGENT_NO)
                .IsRequired()
                .HasMaxLength(12);

            this.Property(t => t.CLIENT_IP)
                .IsRequired()
                .HasMaxLength(200);

            this.Property(t => t.USER_NO)
                .IsRequired()
                .HasMaxLength(14);

            this.Property(t => t.REMARK)
                .HasMaxLength(500);

            this.Property(t => t.STATUS);

            // Table & Column Mappings
            this.ToTable("PRINT_LOG");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.SERIAL_NO).HasColumnName("SERIAL_NO");
            this.Property(t => t.OPERATOR_NO).HasColumnName("OPERATOR_NO");
            this.Property(t => t.AGENT_NO).HasColumnName("AGENT_NO");
            this.Property(t => t.CLIENT_IP).HasColumnName("CLIENT_IP");
            this.Property(t => t.USER_NO).HasColumnName("USER_NO");
            this.Property(t => t.REMARK).HasColumnName("REMARK");
            this.Property(t => t.CREATED_DATE).HasColumnName("CREATED_DATE");
            this.Property(t => t.STATUS).HasColumnName("STATUS");
        }
    }
}
